package Tools;

import Message.CompetitionMessage;

import java.util.ArrayList;

/**
 * @author Joker
 * @create 2022-08-26 14:54
 */
public class ToStringTools {
        public static ArrayList<String> ContestMessageToString(ArrayList<CompetitionMessage> competitionMessages){
            ArrayList<String> strs = new ArrayList<>();
            for (int i = 0; i < competitionMessages.size(); i++) {
                strs.add(new String(competitionMessages.get(i).getCom_name()));
                strs.add(new String(competitionMessages.get(i).getCom_situation()));
                strs.add(new String(competitionMessages.get(i).getCom_master()));
                strs.add(new String(competitionMessages.get(i).getCom_level()));
                strs.add(new String(competitionMessages.get(i).getCom_result()));
            }
            return strs;
        }
    public static ArrayList<String> ToString(ArrayList<String[]> c){
        ArrayList<String> strs = new ArrayList<>();
        for (int i = 0; i < c.size(); i++) {
            for(int j=0;j<c.get(i).length;j++)
                strs.add(c.get(i)[j]);
        }
        return strs;
    }

    }


